package model;

import java.util.ArrayList;
import java.util.List;

public class DiscussionImpl implements Discussion {

	private String title;
	private List<Comment> comments = new ArrayList<Comment>();
	
	@Override
	public String getTitle() {
		return title;
	}

	@Override
	public void setTitle(String title) {
		this.title = title;
	}

	@Override
	public List<Comment> getComments() {
		return comments;
	}

	@Override
	public void setComments(List<Comment> comments) {
		this.comments = comments;
	}

	@Override
	public void addComment(Comment comment) {
		if (comment != null) {
			comments.add(comment);
		}		
	}

}
